home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 12 / Mac Magazin and MacEasy Magazine CD - Issue 12.iso / Sharewarebibliothek / Anwendungen / Wissenschaft & Technik / Yorick / yorick11-ppc folder / README-macyorick < prev    next >
Text File  |  1995-07-17  |  16KB  |  255 lines

  1. The Macintosh version of Yorick was created by Steve Langer
  2. (shl@icf.llnl.gov) from the Unix version written by Dave Munro. This file 
  3. contains some short notes about the Macintosh version, but it is not an 
  4. introduction to yorick. To learn how to use yorick you will have to examine 
  5. the files in the doc directory and run yorick. The first thing you should 
  6. probably do is to print "refs.ps" (the cheat sheets). These PostScript files 
  7. summarize the yorick language and commands. You can use DropPS, freeware 
  8. from Bare Bones software (for information, send E-mail to bbsw@netcom.com 
  9. on the Internet), to send the PostScript files to your printer. Once you have 
  10. yorick running, one of the nice features is the help command. If you know that 
  11. "plg" is the command to make a y versus x plot, but don't remember the 
  12. arguments, type "help,plg". By paying attention to the "see also" functions, you 
  13. can find out a great deal without needing to look at the printed documents.
  14.  
  15. Macintosh versions of Yorick are labeled by the version number of the 
  16. corresponding Unix release followed by the Mac version. For example, 
  17. version 1.1v1 in the get info box means the first version based on Unix 
  18. release 1.1.
  19.  
  20.  
  21. New Features in release 1.1
  22. ---------------------------
  23. There have been several changes since the last release of macyorick in 
  24. January 1995. The most important are improvements in the graphics 
  25. package and the debut of a Power Macintosh version.
  26.  
  27. The Power Macintosh version delivers performance comparable to a low 
  28. end Sun workstation for computation intensive tasks. The graphics 
  29. performance using the built-in graphics is about like a high end x-terminal, 
  30. which is less than a low end workstation. The graphics performance will 
  31. probably improve significantly on the new PCI based Macs. The Power Mac 
  32. version and both 68K Mac versions now have the QR and SVD matrix solvers.
  33.  
  34. Graphics output is much faster than in the previous version, and there are 
  35. several customization options. The quality of thick and dashed lines has been 
  36. improved. This release implements yorick's animation mode. Run demo3.i to 
  37. get an idea of how this works. The animations should run well on a 
  38. PowerMacintosh or a 68040 Mac, but the frame rate will be slow on older Macs. 
  39.  
  40.  
  41. Usage notes
  42. --------------------------------------
  43. Yorick tests carefully to see that it succeeds when it allocates 
  44. memory, but it can crash if it runs out of memory inside the toolbox 
  45. or in the interface library. 
  46.  
  47. Yorick is often used for some serious number crunching, so I have used high 
  48. levels of optimization during compilation. I have had several cases where 
  49. these levels of optimization produced bad code. I believe that I have found 
  50. and dealt with all such problems, but I don't have an exhaustive test suite. 
  51. If you find a case where yorick repeatably produces the wrong answer, 
  52. please send me an example.
  53.  
  54. Yorick ships with a rather large suggested memory size of 5.5 MB. Most simple 
  55. calculations (like operations on 1D arrays) should run just fine in 2 MB. The 
  56. large size is intended to permit 2D computations and the use of animated 
  57. graphics, but it is possible to come up with tasks that require even more memory. 
  58.  
  59.  
  60. Changes since the original release
  61. -------------------------
  62. Most of the changes since the first release are in the user interface. In addition 
  63. to the command window, there is now an editor window. An editor window is a 
  64. basic text editor with an execute button. You create an editor with the 
  65. "New Editor" command in the File menu. Use the standard Open command to load 
  66. a file into the editor. When you click on the execute button, the file is SAVED and 
  67. then included and executed by yorick. All yorick output will be sent to the 
  68. command window. If you double-click on a file of type 'TEXT' with a creator 
  69. 'York', yorick will be launched (if not already running), it will set it's working 
  70. directory to the directory where the file is located, and it will open the file in 
  71. an editor window. The yorick.dir and gist.dir files used in the first release to 
  72. tell yorick and gist where their support files are located are no longer needed. 
  73. The support files must now be located in the same directory with yorick and gist 
  74. (they are organized this way in the "sea" files we distribute). If you frequently 
  75. need to include files from specific directories, add the directory to the yorick 
  76. search path in your custom.i file (or perhaps at the top of another include file). 
  77. There is also a set directory command in the file menu.
  78.  
  79. This version of yorick can be set up so that when yorick detects a syntax error 
  80. (or on some run time errors), it will open the file containing the error in an 
  81. editor window and select the offending line. This feature is turned on by default, 
  82. but may be disabled in the preferences dialog in the edit menu. Yorick will be 
  83. unable to open the file if it is in use by another program (e.g. a text editor) 
  84. and will generate an error message.
  85.  
  86. Other changes include the addition of a way to interrupt some long running 
  87. calculations. Select the "allow-command'period" check box in the preferences 
  88. dialog in the edit menu, then when you hold down the command-period key, 
  89. yorick will return to the prompt at the end of the next yorick instruction or at 
  90. suitable points in the write routines. See the discussion at the end for more details.
  91.  
  92. gist has an option to select either yorick-style CGM files or CGM files made 
  93. by ATC GKS. If you don't know what this means, stick with yorick CGM files.
  94.  
  95.  
  96. Installation
  97. ------------
  98. Yorick is distributed in several self-extracting archive files. There is a version 
  99. that runs on any 68020, 68030, or 68040 Mac with a floating point chip 
  100. (68881 etc.), another version that runs on all 68020, 68030, or 68040 Macs and 
  101. under emulation on PowerMacs (it doesn't use a floating point chip, even if one 
  102. is present) , and a native Power Mac version. Another program that is included is a
  103. Macintosh version of gist, a binary CGM file reader. gist can read the CGM files 
  104. written by yorick and can read some other binary CGM files, too. gist is 
  105. particularly useful for making PICT files from a CGM file written by a Unix
  106. version of yorick. gist does not require a floating point chip and will run under 
  107. emulation on a Power Mac. gist and all versions of yorick require Color Quickdraw. 
  108. The yorick versions check for the required hardware and quit if it is not found 
  109. (it is possible that the detection scheme will fail on pre-System 6 Macs, but 
  110. the program will not run there anyway).
  111.  
  112. If you have MacBinary capability in your ftp program, download the "sea" file. 
  113. If you are using a unix-like ftp, download the "hqx" file and use a program like 
  114. UnStuffIt to decode the BinHex file. Once you have the "sea" file, double-click 
  115. on it and it will automatically split itself apart into the constituent files. 
  116.  
  117. Introduction
  118. ------------
  119. Yorick is a tool for analyzing numerical data. It has an interpreter that uses 
  120. a C-like language and can operate on entire arrays without any need for do-loops 
  121. over the array indices. Yorick has a file I/O package with the ability to 
  122. conveniently read text files with columns of numbers. The file I/O package 
  123. can easily be trained to read a wide variety of binary and text files, if the 
  124. formatting rules for the file are known. Yorick also has a 2D graphics package 
  125. that includes polylines, contour plots, cell arrays, and filled mesh plots. 
  126.  
  127. History
  128. -------
  129. Yorick was originally written to run on Unix workstations. Instructions to 
  130. yorick are typed in a command window. Yorick writes responses to the command 
  131. window and draws plots in one or more graphics windows. The user interface 
  132. for yorick is text input oriented by design - the easiest way to specify 
  133. transformations to apply to data is usually some equation-like form. 
  134.  
  135. Macintosh Version
  136. -----------------
  137. The Macintosh version of yorick is very similar to the Unix version, and almost 
  138. all of the yorick documentation should apply. The principal differences are that 
  139. the Mac version can save any graphics window to a PICT file (as well as yorick's
  140. native CGM and Postscript formats), and that the command window is closer to 
  141. being a text editor than a dumb terminal window. The main thing to know about 
  142. the command window is that when you press the return key, everything to the 
  143. left of the cursor in the current line is passed to yorick as a command. If there 
  144. is any selected text when the return key is pressed, the selected text is passed 
  145. to yorick as a command. This last feature can be used to send several lines at 
  146. a time  to yorick. The enter key does not cause the line to be executed, so it can 
  147. be used in building multi-line commands to be executed as a single "selection". 
  148. Yorick has simple text editor windows that can be used for examining ascii data 
  149. files or preparing yorick input decks. An editor is created using the "New Editor" 
  150. command in the file menu. Text editor windows have an "execute" button that 
  151. causes the contents of the editor to be read as if yorick had been given an include 
  152. command. When yorick detects an error while reading a file (even nested include 
  153. files), it will open the offending file in a text editor and place the cursor on the 
  154. bad input line (this behavior can be disabled). 
  155.  
  156. The Macintosh version also supports the use of "command-period" to abort long 
  157. running yorick calculations. Yorick only checks for command-period between 
  158. interpreted commands and while writing to the command window. If you have 
  159. started a matrix solve that will take an hour to complete, using command-period 
  160. will not help, because it will not be checked until the matrix solve completes. 
  161. You can disable this feature using the preferences dialog in the edit menu. 
  162.  
  163. The Macintosh version of yorick was built using the FaceIt package from 
  164. FaceWare, 1310 N. Broadway, Urbana, Illinois, 61801,
  165. (217) 328-5842, faceware@aol.com. 
  166. The source code for yorick is available if you wish to build a custom version 
  167. incorporating your own compiled routines (don't bother compiling your own 
  168. routines until you are sure that an interpreted version with array syntax is 
  169. too slow). To build a Macintosh version, you will need to buy a copy of FaceIt, and 
  170. then request the Macintosh source from me. At some point in the future, there 
  171. may be a Mac version based on the class library provided with Think C or 
  172. Metrowerks C, which would make it simpler to create custom versions.
  173.  
  174. Graphics
  175. --------
  176. The Macintosh version of yorick implements the full gist graphics package. 
  177. Each graphics window has a button that saves the current plot as a PICT file, 
  178. a button to redraw the window, and a button to set the preferences flags for 
  179. graphics. The PICT file can be set up either to produce a high quality image 
  180. when printed or in a form that will make it easier to edit the PICT file in 
  181. Canvas, MacDraw, etc. This choice can be made for an individual graphics 
  182. window using the Window Props button, or for future graphics windows using 
  183. the window prefs button in the preferences dialog under the edit menu. 
  184.  
  185. Another graphics preference controls whether or not everything that is drawn 
  186. to a graphics window is simultaneously recorded in a PICT in memory. 
  187. The previous versions of mac yorick always recorded a PICT, but this slowed 
  188. graphics significantly. The default is now not to record the PICT, but 
  189. mac yorick no longer "repairs" windows when they are hidden behind other 
  190. windows then brought to the front again. To redraw the window contents, 
  191. click on the redraw button. The window preferences can be used 
  192. to force PICT recording if you get tired of clicking the redraw button. 
  193.  
  194. There is a problem that occurs with color plots when you have an 8 bit deep 
  195. screen. Yorick loads a color table of roughly 210 colors and uses those in 
  196. plotting to the screen. Yorick allows you to pick from a number of pre-
  197. defined color tables, or to create your own. This allows you to produce striking 
  198. cell arrays or filled meshes on an 8 bit screen. The problem is that if you save 
  199. the plot in a PICT file, any Mac program that loads the PICT file is unlikely
  200. to be using the same color table as yorick used in creating the image. The Mac 
  201. will do the best job of displaying the image that it can, given the current color 
  202. table, but a lot of "banding" may show up in the image. The only way to fix this, 
  203. with an 8 bit screen, is to load the same color table into the other Mac program 
  204. as was used by yorick (non-trivial). HOWEVER, all of the color information is still
  205. present in the file, so the colors will show up properly on a color printer. This 
  206. problem should not be noticable on a 16 or 24 bit "true color" screen. 
  207.  
  208. This version of mac yorick supports yorick's animated graphics mode. In the 
  209. normal graphics mode, everything appears on the screen as each graphics 
  210. command is executed. In animation mode, the whole plot is drawn in an 
  211. offscreen pixmap and then copied to the screen all at one time. The result is 
  212. that the transition between successive pictures is smooth. Animation mode 
  213. is particularly useful in viewing the results of a time dependent simulation. 
  214. The simulation might have saved its results in a file, or the simulation might 
  215. actually be run directly by yorick (see demo3.i or demo2.i for an example).
  216.  
  217. Yorick can write plots to binary CGM files. The CGM file was originally
  218. developed for use on mainframe computers, and the standard is showing its age 
  219. in some respects. One of the key problems is that there is no defined way to 
  220. specify the exact font you desire in a CGM file. The result is that the program 
  221. that wrote the CGM file can usually display it exactly, but other programs 
  222. (e.g. Canvas) only produce an approximate rendition. My suggestion is that you 
  223. use CGM files as places to store a group of related images (the CGM file could 
  224. even be written on a Unix workstation). When you need to use an image in another
  225. Mac program, load the CGM file into the Macintosh version of gist (a CGM file 
  226. browser) and save the desired frame as a PICT file. 
  227.  
  228. Known Bugs and Missing Features
  229. -------------------------------
  230. 1) Yorick has been heavily tested on Unix workstations for a couple of years now. 
  231. It has been used for a wide variety of production calculations, but we still find 
  232. around a bug (usually obscure) a month. The bugs don't prevent us from using 
  233. yorick, and are about what should be expected from a code of this complexity. 
  234. As a new yorick user, most of your problems are likely to stem from giving 
  235. yorick the wrong command, or possibly from asking yorick to do something 
  236. that will take forever. Look at the examples and start with simple problems, 
  237. and things should go pretty smoothly.
  238.  
  239. The Mac version of yorick has not been tested as heavily as the unix version, 
  240. so there are probably more bugs in it. The core code is the same as for the unix 
  241. version, so any bugs are most likely to be in the graphics package or the user 
  242. interface, the parts of yorick that had to be changed the most in porting to the 
  243. Mac. In spite of this caveat, I expect the Mac version to be pretty reliable. If you 
  244. can find a simple, repeatable way to make yorick crash or get a wrong answer, 
  245. I would like to know what it is, so I can try to fix it. If it locks up after hours 
  246. of use and lots of number crunching, I won't be able to reproduce your problem. 
  247. My hope is that I will get enough simple examples to stamp out any reproducible 
  248. bugs in fairly short order.
  249.  
  250. 2) If your CGM files wind up in pure black and white, try using the "dump=1" 
  251. option on the hcp_file command. The default behavior is to dump a gray scale 
  252. file on the theory that most printers are black and white. There is some reason 
  253. to think that the default should be to automatically dump the color table, but for 
  254. now you need to explicitly dump it. 
  255.